package com.ly.heart.service;

import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingPayableReceivableVerificationDetailEntity;
import com.ly.heart.domain.KingPayableReceivableVerificationEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.heart.domain.dto.KingPayableVerificationDto;
import com.ly.heart.domain.vo.KingPayableVerificationVo;

import java.util.List;

/**
 * <p>
 * 应付付款单核销单 服务类
 * </p>
 *
 * @author WuZH
 * @since 2024-08-12
 */
public interface IKingPayableReceivableVerificationService extends IService<KingPayableReceivableVerificationEntity> {

    AjaxResult queryList ( KingPayableReceivableVerificationEntity kingPayableReceivableVerificationEntity);

    KingPayableVerificationVo querySingle ( String id );

    AjaxResult saveSingle (KingPayableReceivableVerificationEntity kingPayableReceivableVerificationEntity, List<KingPayableReceivableVerificationDetailEntity> payableVerificationDetailEntities );

    AjaxResult manualVerification ( KingPayableVerificationDto kingPayableVerificationDto );

    KingPayableVerificationVo loadVerificationList ( String supperId );

    /**
     * 匹配核销，应收/应付审核后有可能会触发匹配核销；收款/付款审核后也有可能触发匹配核销
     * 在后生成单据审核时触发匹配核销
     *
     * @param type：类型，为1表示应付付款核销单，后面两个id则表示应付单Id和付款单Id；未2时，则表示应收单Id和收款单Id
     * @param source：来源；1=应付单触发来的；2=付款单触发来的；3=应收单触发来的；4=收款单触发来的
     * @param id：单据Id，对应上面source字段，分别为对应单据的Id
     * @param orderIds：采购/销售订单Id
     * @return
     */
    AjaxResult matchVerify ( Integer type, Integer source, String id, List<String> orderIds );

}
